package com.fybspace.primary.DAO;

import com.fybspace.primary.Entity.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * Created by studio on 2017/4/6.
 */

@Repository
public interface UserDAO extends JpaRepository<UserEntity,Integer> {

    @Query(value = "select * from user where username = ?",nativeQuery = true)
    public UserEntity findByUsername(String username);
}
